package com.lanchetech.dao;

import com.lanchetech.bean.vo.RoomStatisticsVO;
import com.lanchetech.entity.RoomMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoomMessageMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RoomMessage record);

    int insertSelective(RoomMessage record);

    RoomMessage selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RoomMessage record);

    int updateByPrimaryKey(RoomMessage record);

    List<RoomMessage> findLately10Comment(@Param("anchorUserId") Long anchorUserId, @Param("roomId") Long roomId);

    RoomMessage findSpuMessage(@Param("anchorUserId") Long anchorUserId, @Param("roomId") Long roomId);

    List<RoomStatisticsVO> getRoomStatistics(Long roomId);
}